package com.wanli.storemobile.homepage;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

import com.wanli.storemobile.R;
import com.wanli.storemobile.base.BaseActivity;
import com.wanli.storemobile.login.LoginActivity;
import com.wanli.storemobile.widget.AppTitleBar;

public class MerchantIntoActivity extends BaseActivity {


    @BindView(R.id.title_bar)
    AppTitleBar titleBar;
    private String channel_type;
    private String qr_code_data;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_merchant_into);
        ButterKnife.bind(this);
        initView();
    }

    private void initView() {
        Intent intent = getIntent();
        qr_code_data = intent.getStringExtra("qr_code_data");
        channel_type = intent.getStringExtra("channel_type");

    }

    @OnClick({R.id.ll_store_1, R.id.ll_store_2, R.id.ll_store_3, R.id.ll_store_4, R.id.ll_store_5})
    public void onViewClicked(View view) {
         Intent intent;
        switch (view.getId()) {
            case R.id.ll_store_1:
                intent = new Intent(MerchantIntoActivity.this, StoreDataActivity.class);
                intent.putExtra("qr_code_data", qr_code_data);
                intent.putExtra("type", "1");
                intent.putExtra("channel_type", channel_type);
                startActivity(intent);
                finish();
                break;
            case R.id.ll_store_2:
                 intent = new Intent(MerchantIntoActivity.this, StoreDataActivity.class);
                intent.putExtra("qr_code_data", qr_code_data);
                intent.putExtra("type", "2");
                intent.putExtra("channel_type", channel_type);
                startActivity(intent);
                finish();
                break;
            case R.id.ll_store_3:
                 intent = new Intent(MerchantIntoActivity.this, StoreDataActivity.class);
                intent.putExtra("qr_code_data", qr_code_data);
                intent.putExtra("type", "3");
                intent.putExtra("channel_type", channel_type);
                startActivity(intent);
                finish();
                break;

        }
    }
}